
import {createSlice,configureStore} from '@reduxjs/toolkit'

const publicModule = createSlice({
    name:'public',
    initialState:{
        count:0,
        isShopbagCountLoad:false,
    },
    reducers:{
        changeCount(state,actions) {
            state.count = actions.payload
        },
        changeIsShopbagCountLoad(state,actions) {
            state.isShopbagCountLoad = actions.payload
        },
    }
})

export const {changeCount,changeIsShopbagCountLoad} = publicModule.actions

export default configureStore({
    reducer:{
        public:publicModule.reducer
    }
})